home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Internet Info 1994 March
/
Internet Info CD-ROM (Walnut Creek) (March 1994).iso
/
networking
/
ip
/
ka9q
/
src.arc
/
IFACE.H
< prev
next >
Wrap
C/C++ Source or Header
|
1989-08-19
|
2KB
|
56 lines
#ifndef NULLIF
#include "global.h"
/* Interface control structure */
struct iface {
struct iface *next; /* Linked list pointer */
char *name; /* Ascii string with interface name */
int (*ioctl) __ARGS((struct iface *,int,char **));
/* Function to handle device control */
int (*send) __ARGS((struct mbuf *,struct iface *,int32,int,int,int,int));
/* Routine to send an IP datagram */
int (*output) __ARGS((struct iface *,char *,char *,int16,struct mbuf *));
/* Routine to send link packet */
int (*raw) __ARGS((struct iface *,struct mbuf *));
/* Routine to call to send raw packet */
int (*stop) __ARGS((struct iface *));
/* Routine to call before detaching */
int16 mtu; /* Maximum transmission unit size */
int16 dev; /* Subdevice number to pass to send */
int16 flags; /* Configuration flags */
#define DATAGRAM_MODE 0 /* Send datagrams in raw link frames */
#define CONNECT_MODE 1 /* Send datagrams in connected mode */
int16 trace; /* Trace flags */
#define IF_TRACE_OUT 0x01 /* Output packets */
#define IF_TRACE_IN 0x10 /* Packets to me except broadcast */
#define IF_TRACE_ASCII 0x100 /* Dump packets in ascii */
#define IF_TRACE_HEX 0x200 /* Dump packets in hex/ascii */
#define IF_TRACE_NOBC 0x1000 /* Suppress broadcasts */
char *hwaddr; /* Device hardware address, if any */
struct iface *forw; /* Forwarding interface for output, if rx only */
};
#define NULLIF (struct iface *)0
extern struct iface *Ifaces; /* Head of interface list */
/* Header put on front of each packet in input queue */
struct phdr {
struct iface *iface;
unsigned short type;
#define TYPE_AX25 0
#define TYPE_ETHER 1
#define TYPE_IP 2
#define TYPE_APPLETALK 3
#define TYPE_KISS 4
#define NLTYPE 5
};
extern struct mbuf *Hopper;
/* In iface.c: */
struct iface *if_lookup __ARGS((char *name));
#endif /* NULLIF */